package com.edu.exam.enums.analysis;

/**
 * 修订紧急度枚举
 */
public enum RevisionUrgency {
    IMMEDIATE("IMMEDIATE", "立即修订"),
    URGENT("URGENT", "紧急修订"),
    NORMAL("NORMAL", "正常修订"),
    LOW("LOW", "低优先级修订"),
    NONE("NONE", "无需修订");

    private final String code;
    private final String description;

    RevisionUrgency(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static RevisionUrgency fromCode(String code) {
        for (RevisionUrgency urgency : values()) {
            if (urgency.getCode().equals(code)) {
                return urgency;
            }
        }
        return NONE;
    }
}